{{header}}
<style>
    {{custom_style}}
</style>
{% include template('partial/d_breadcrumb') %}
    {% include template('partial/d_layout_open') %}
        <div class="bm">
            <div class="bm-author-info clearfix">
                {% if edit %}<div class="btn-group btn-group-xs pull-right" ><a class="btn btn-default " href="{{edit}}" target="_blank"><i class="fa fa-pencil"></i> {{text_edit}}</a></div>{% endif %}
                <h1 class="h1 title">{{heading_title}}</h1>
                {% if thumb %}
                <div class="image"><img src="{{thumb}}" alt="{{heading_title}}" title="{{heading_title}}" class="img-responsive"  /></div>
                {% endif %}
                {% if description %}
                <div class="description">{{description}}</div>
                {% endif %}
            </div>

            {% if categories %}
            <div class="bm-categories">
                <div class="h3">{{text_categories}}</div>

                <div class="row">
                    {% for category in categories %}
                    <div class="col-sm-{{category.col}} col-xs-4">
                        <a class="item-category" href="{{href}}">
                            {% if setting.category.sub_category_image %}
                                <div class="image"><img src="{{thumb}}" alt="{{title}}" title="{{title}}" /></div>
                            {% endif %}
                            <div class="title">{{title}}</div>
                        </a>
                    </div>
                    {% endfor %}
                </div>
            </div>
            {% endif %}

            {% if posts %}
                {% include template(layout_template) with posts %}
            {% endif %}

            {% if not posts %}
                <p class="bm-empty">{{text_empty}}</p>
                <div class="buttons">
                    <div class="pull-right"> {% include template('partial/button') with {button:{
                            link:continue, 
                            style:'primary',
                            text_button: button_continue
                    }} %}</div>
                </div>
            {% endif %}
        </div>
    {% include template('partial/d_layout_close') %}
{{footer}}
